<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>小米6立即购买-小米商城</title>
        <link rel="stylesheet" type="text/css" href="/style/home/css/style.css">
        <script src="/js/jquery-1.8.3.min.js"></script>
    </head>
    <body>
        <!-- start header -->
        <header>
            <div class="top center">
                <div class="left fl">
                    <ul>
                        <li><a href="http://www.mi.com/" target="_blank">小米商城</a></li>
                        <li>|</li>
                        <li><a href="">MIUI</a></li>
                        <li>|</li>
                        <li><a href="">米聊</a></li>
                        <li>|</li>
                        <li><a href="">游戏</a></li>
                        <li>|</li>
                        <li><a href="">多看阅读</a></li>
                        <li>|</li>
                        <li><a href="">云服务</a></li>
                        <li>|</li>
                        <li><a href="">金融</a></li>
                        <li>|</li>
                        <li><a href="">小米商城移动版</a></li>
                        <li>|</li>
                        <li><a href="">问题反馈</a></li>
                        <li>|</li>
                        <li><a href="">Select Region</a></li>
                        <div class="clear"></div>
                    </ul>
                </div>
                <div class="right fr">
                    <div class="gouwuche fr"><a href="/home/cart">购物车</a></div>
                    <div class="fr">
                        <ul>
                            <li><a href="./login.html" target="_blank">登录</a></li>
                            <li>|</li>
                            <li><a href="./register.html" target="_blank" >注册</a></li>
                            <li>|</li>
                            <li><a href="">消息通知</a></li>
                        </ul>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
        </header>
        <!--end header -->

        <!-- start banner_x -->
        <div class="banner_x center">
            <a href="./index.html" target="_blank"><div class="logo fl"></div></a>
            <a href=""><div class="ad_top fl"></div></a>
            <div class="nav fl">
                <ul>
                    @foreach($data as $value)
                    <li><a href="/home/list/{{$value->id}}">{{$value->name}}</a></li>
                    @endforeach 
                </ul>
            </div>
            <div class="search fr">
                <form action="" method="post">
                    <div class="text fl">
                        <input type="text" class="shuru"  placeholder="小米6&nbsp;小米MIX现货">
                    </div>
                    <div class="submit fl">
                        <input type="submit" class="sousuo" value="搜索"/>
                    </div>
                    <div class="clear"></div>
                </form>
                <div class="clear"></div>
            </div>
        </div>
        <!-- end banner_x -->


        <!-- xiangqing -->
        <form action="" id="FormAdd" onsubmit="return false">
            <div class="xiangqing">
                <div class="neirong w">
                    <div class="xiaomi6 fl">小米6</div> 
                    <div class="clear"></div>
                </div>	
            </div>

            <div class="jieshao mt20 w">
                <div class="left fl"><img width="562" height="562" src="{{$info->img}}"></div>
                <div class="right fr">
                    <div class="h3 ml20 mt20">{{$info->title}}</div>
                    <div class="jianjie mr40 ml20 mt10">{{$info->info}}</div>
                    <div class="jiage ml20 mt10">{{$info->m_price}}.00元</div>
                    <!--                    <div class="ft20 ml20 mt20">选择版本</div>
                                        <div class="xzbb ml20 mt10">
                                            <div class="banben fl">
                                                <a>
                                                    <span>全网通版 6GB+64GB </span>
                                                    <span>2499元</span>
                                                </a>
                                            </div>
                                            <div class="banben fr">
                                                <a>
                                                    <span>全网通版 6GB+128GB</span>
                                                    <span>2899元</span>
                                                </a>
                                            </div>
                                            <div class="clear"></div>
                                        </div>-->
                    <!--                    <div class="ft20 ml20 mt20">选择颜色</div>
                                        <div class="xzbb ml20 mt10">
                                            <div class="banben">
                                                <a>
                                                    <span class="yuandian"></span>
                                                    <span class="yanse">亮黑色</span>
                                                </a>
                                            </div>
                    
                                        </div>-->
                    <div class="xqxq mt20 ml20">
                        <div class="top1 mt10">
                            <div class="left1 fl">{{$info->title}} {{$info->info}}</div>
                            <div class="right1 fr">{{$info->m_price}}.00元</div>
                            <div class="clear"></div>
                        </div>
                        <div class="bot mt20 ft20 ftbc">总计：{{$info->m_price}}元</div>
                    </div>
                    <div class="xiadan ml20 mt20">
                        <input class="jrgwc"  type="button" name="jrgwc" value="立即选购" />
                        <input class="jrgwc" onclick="AddCart({{$info->id}});" type="button" name="jrgwc" value="加入购物车" />

                    </div>
                </div>  
                <div class="clear"></div>
            </div>
        </form>
        <div style="margin: 0 auto;width: 1200px;">
            {!!$info->text!!}
        </div>
        <!-- footer -->
        @include('foot')
        <script>
             function AddCart(gid){
                 str=$("#FormAdd").serialize();
                 $.post('/home/InsertCart/'+gid,{"_token":"{{csrf_token()}}","_method":"get"},function(data){
                      if(data==1){
                          window.location.href='/home/cart';
                      }
                 })
             }
        </script>